package com.qibo.receipt;

import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.qibo.baselib.base.BaseActivity;
import com.qibo.baselib.utils.PrinterManagerUtil;

/***
 * 收款成功
 */
public class SuccessfulPayActivity extends BaseActivity{
    private Button successfullpay_btn_receipt;
    private Button successfullpay_btn_continue;
    private TextView successfullpay_tv_amout;
    @Override
    protected int getContentViewId() {
        return R.layout.receiptmodule_activity_successfullpay;
    }

    @Override
    protected void initView() {
        successfullpay_btn_receipt = findViewById(R.id.successfullpay_btn_receipt);
        successfullpay_btn_continue = findViewById(R.id.successfullpay_btn_continue);
        successfullpay_tv_amout = findViewById(R.id.successfullpay_tv_amout);
        if(!"".equals(getIntent().getStringExtra("amount"))&& null != getIntent().getStringExtra("amount")){
            successfullpay_tv_amout.setText("￥"+getIntent().getStringExtra("amount"));
        }

    }

    @Override
    protected void initAction() {
        successfullpay_btn_receipt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                new PrinterManagerUtil(mContext);
            }
        });
        successfullpay_btn_continue.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }

    @Override
    protected void initData() {

    }
}
